function changeAttributes(overwrite_values)
{
	article = 		new Array(2,2,2,0,0,0,0,0,2,2,1,1,1,1,1,0,0,0,0,0);
	book = 			new Array(2,2,2,0,2,2,0,0,0,2,1,1,0,1,1,1,1,1,1,0);
	booklet = 		new Array(2,2,1,0,0,0,0,0,0,1,0,0,0,1,1,0,1,0,0,1);
	conference = 	new Array(2,2,2,2,1,1,1,0,0,2,1,1,1,1,1,1,1,0,0,0);
	inbook = 		new Array(2,2,2,2,2,2,0,0,0,2,1,1,2,1,0,1,1,1,0,0);
	incollection =  new Array(2,2,2,2,1,2,0,0,0,2,1,1,1,1,1,1,1,1,0,0);
	inproceedings = new Array(2,2,2,2,1,1,1,0,0,2,1,1,1,1,1,1,1,0,0,0);
	manual = 		new Array(2,2,1,0,0,0,1,0,0,1,0,0,0,1,1,0,2,1,0,0);
	mastersthesis = new Array(2,2,2,0,0,0,0,2,0,2,0,0,0,1,1,0,1,0,0,0);
	misc = 			new Array(2,1,1,0,0,0,0,0,0,1,0,0,0,1,1,0,0,0,0,1);
	phdthesis = 	new Array(2,2,2,0,0,0,0,2,0,2,0,0,0,1,1,0,1,0,0,0);
	proceedings = 	new Array(2,2,0,0,1,1,1,0,0,2,1,1,0,1,1,1,1,0,0,0);
	techreports = 	new Array(2,2,2,0,0,0,0,0,0,2,0,1,0,1,1,0,1,0,0,0);
	unpublished = 	new Array(2,2,2,0,0,0,0,0,0,1,0,0,0,1,2,0,0,0,0,0);

	visibilities = new Array(article, book, booklet, conference, inbook,
							 incollection, inproceedings, manual, 
							 mastersthesis, misc, phdthesis, proceedings,
							 techreports, unpublished);

	textfields = new Array("label", "title", "authors", "booktitle",
						   "editor", "publisher", "organization", "school",
						   "journal", "year", "volume", "number", "pages",
						   "month",	"note", "series", "address", "edition",
						   "isbn", "howpublished" );

	currentType = visibilities[document.getElementById("attrType").value];

	for(var i = 0; i<currentType.length;i++) {
		classname = "form-line field hidden";
		
		if(currentType[i] == 2){
			classname= "form-line field compulsory";
			document.getElementById(textfields[i]).setAttribute("required", "required");
		}
		else if(currentType[i] == 1){
			classname= "form-line field optional";
			document.getElementById(textfields[i]).removeAttribute("required");
		}
		
		document.getElementById("field_"+textfields[i]).setAttribute("class", classname);
		overwrite_values = typeof overwrite_values !== 'undefined' ? overwrite_values : true;
		if (overwrite_values)
			document.getElementById(textfields[i]).value = "";
	}
}